﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.AddComponentMenu
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>The AddComponentMenu attribute allows you to place a script anywhere in the "Component" menu, instead of just the "Component-&gt;Scripts" menu.</para>
  /// </summary>
  public sealed class AddComponentMenu : Attribute
  {
    private string m_AddComponentMenu;
    private int m_Ordering;

    /// <summary>
    ///   <para>Add an item in the Component menu.</para>
    /// </summary>
    /// <param name="menuName">The path to the component.</param>
    /// <param name="order">Where in the component menu to add the new item.</param>
    public AddComponentMenu(string menuName)
    {
      this.m_AddComponentMenu = menuName;
      this.m_Ordering = 0;
    }

    /// <summary>
    ///   <para>Add an item in the Component menu.</para>
    /// </summary>
    /// <param name="menuName">The path to the component.</param>
    /// <param name="order">Where in the component menu to add the new item.</param>
    public AddComponentMenu(string menuName, int order)
    {
      this.m_AddComponentMenu = menuName;
      this.m_Ordering = order;
    }

    public string componentMenu => this.m_AddComponentMenu;

    /// <summary>
    ///   <para>The order of the component in the component menu (lower is higher to the top).</para>
    /// </summary>
    public int componentOrder => this.m_Ordering;
  }
}
